<%-- 
    Document   : dealbanchaycontent
    Created on : Oct 2, 2011, 11:15:08 AM
    Author     : Administrator
--%>

<%@page import="java.text.DecimalFormat"%>
<%@page import="hibernate.pojo.Sanpham"%>
<%@page import="java.util.List"%>
<%@page import="org.hibernate.HibernateException"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Zing Deal | Copyright</title>
        <link href="DealZing_files/6aad5646.css" rel="stylesheet" type="text/css" />
        <link href="DealZing_files/8fe69eb0.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <div class="BoxTop">
            <div class="BoxVien">
                <div class="BoxBot">
                    <h2>Deal đang chạy</h2>
                    <ul class="BoxDealRun">
                        <%
                            try
                            {
                                DecimalFormat df = new DecimalFormat("###,###");
                                List<Sanpham> arrSanPham = (List<Sanpham>)request.getAttribute("DanhSachSanPhamBanChay");
                                if(arrSanPham!=null)
                                {
                                    for(int i=0; i<arrSanPham.size(); i++)
                                    {
                                        Sanpham sanpham = arrSanPham.get(i);
                        %>
                                        <li>
                                            <h4><a href="dealdetailcontroller?action=viewdealdetail&amp;state=opening&amp;maSanPham=<%=sanpham.getMaSanPham()%>" title="<%=sanpham.getTieuDeSanPham()%>"><%=sanpham.getTenSanPham()%></a></h4>
                                            <div class="DealRunning">
                                                <a href="dealdetailcontroller?action=viewdealdetail&amp;state=opening&amp;maSanPham=<%=sanpham.getMaSanPham()%>" title="<%=sanpham.getTieuDeSanPham()%>" class="Left">
                                                    <img src="<%=sanpham.getAnhDaiDien()%>" class="" alt="[Hình:<%=sanpham.getTieuDeSanPham()%>]" title="<%=sanpham.getTieuDeSanPham()%>" width="240" height="184" /></a>
                                                    <a href="dealdetailcontroller?action=viewdealdetail&amp;state=opening&amp;maSanPham=<%=sanpham.getMaSanPham()%>" class="View"><span>Xem</span></a>
                                                <div class="GiaDealRun">
                                                    <p class="TextOff"><span class="c cr" title=""><%=df.format(sanpham.getTriGia())%></span> đ</p>
                                                    <p class="TextSpace">Còn lại</p>
                                                    <p class="Right"><strong class="Text16"><span class="c cr" title=""><%=df.format(sanpham.getGiaBan())%></span></strong>&nbsp;<span class="Text12">đ</span></p>
                                                </div>
                                            </div>
                                        </li>
                        <%
                                    }
                                }
                            }
                            catch(HibernateException ex)
                            {
                                out.println(ex);
                            }
                        %>                                          
                    </ul>
                </div>
            </div>
        </div>
    </body>
</html>
